#ifndef __SENSOR_TF_LUNA_H__
#define __SENSOR_TF_LUNA_H__

#include <esp_err.h>

typedef struct _tf_luna_ctx tf_luna_ctx_t;

#define TF_LUNA_TEMPERATURE_FACTOR 100

typedef struct _tf_luna_info_t {
    uint16_t dist_cm;
    uint16_t amp;
    uint16_t temperature; /* Unit: x0.01 Celsius degree */
} tf_luna_info_t;

esp_err_t tf_luna_init(tf_luna_ctx_t **pp_ctx);
void tf_luna_deinit(tf_luna_ctx_t *p_ctx);
esp_err_t tf_luna_get_info(tf_luna_ctx_t *p_ctx, tf_luna_info_t *p_info);

#endif /* __SENSOR_TF_LUNA_H__ */
